<!DOCTYPE html>
<html class="x-admin-sm" lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>福昕ofd阅读</title>
    <link rel="stylesheet" href="/css/xadmin.css">
    <script src="/js/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/js/xadmin.js"></script>
    <script type="text/javascript" src="/js/foxit.ofd.ocx.new.js"></script>
    <script type="text/javascript">
        var obj;

        function fx_init() {
            var width = document.documentElement.clientWidth;
            var height = document.documentElement.clientHeight;
            obj = OFD.OCX.init("layui-fluid", width, height);
            obj.ready(obj._id);
             if (!("ActiveXObject" in window)) {
                 obj.jsCallbackFun_InitSetting();
                 obj.jsCallbackFun_UpdateInfo();
             }
            obj.openFile("D:\\1.ofd", false);
        }

        function initSetting() {
            console.log("-------------------initSetting");
            obj.setCompositeVisible("Print", true);
        }

        //回调事件：包括翻页、打印、打印设置
        function UpdateInfo(strkey, strValue) {
            if (strkey == "GetCurPageIndex") {
                //var curPageIndex=obj.getCurPageIndex();
            } else if (strkey == "Print") {
                var log = obj.getLogFileContent();
            } else if (strkey == "PrintSetting") {
                alert(strValue);
            } else if (strkey == 'OpenfilePath') {
                //obj.showContextMenu(0);
                obj.showToolbar(0);
                obj.setViewPreference("Navigate", 1);
            } else if (strkey == 'SaveFileUp') {
                //保存文件成功后的回调操作
                //刷新页面等
            }
        }
    </script>
</head>

<body onload="fx_init()">

<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">演示</a>
        <a>
          <cite>导航元素</cite></a>
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       onclick="location.reload()" title="刷新">
        <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
</div>
<div id="layui-fluid" class="layui-fluid">
</div>
</body>
</html>